﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yq.WebModel.Sys
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public class User
    {
        yq.Model.Logic.UserAccount _Account;

        public yq.Model.Logic.UserAccount Account
        {
            get { return _Account; }
            set { _Account = value; }
        }

        IList<yq.Model.Logic.UserLogin> _Login;

        public IList<yq.Model.Logic.UserLogin> Login
        {
            get { return _Login; }
            set { _Login = value; }
        }

        yq.Model.Logic.UserInfo _Info;

        public yq.Model.Logic.UserInfo Info
        {
            get { return _Info; }
            set { _Info = value; }
        }

        string _DepartmentName="";

        public string DepartmentName
        {
            get {

                if (string.IsNullOrEmpty(_DepartmentName) && string.IsNullOrEmpty(this.Info.DepartmentId)==false)
                {
                    _DepartmentName = yq.Model.Logic.DepartmentList.Load(this.Info.DepartmentId).Title;
                }

                return _DepartmentName; 
            }
        }

    }
}
